package com.example.footballsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.footballsystem.entity.SeriesGame;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ServiesGameMapper extends BaseMapper<SeriesGame> {
    @Insert("insert into seriesgame(seriesID, fieldID, personNum, InitiaorAccount, CompetitionSystem, create_date) VALUES (#{seriesID},#{fieldID},#{personNum},#{initiaorAccount},#{competitionSystem},#{creatData})")
    public Boolean addSeriesGame(SeriesGame seriesGame);
    @Select("select * from seriesgame")
    public List<SeriesGame> getAllSeriesGame();
    @Select("select * from seriesgame where seriesID=#{seriesID}")
    public SeriesGame getSeriesGame(int seriesID);
    @Select("select * from seriesgame where Name like #{info}")          //searchByName("%info%")
    public List<SeriesGame> searchByName(String info);
}
